package cn.itsource.api.fallback;

import cn.itsource.api.LoginRemoteApi;
import cn.itsource.pojo.domain.Login;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class LoginRemoteApiBackFactory implements FallbackFactory<LoginRemoteApi> {
    @Override
    public LoginRemoteApi create(Throwable cause) {
        return new LoginRemoteApi() {
            @Override
            public JSONResult create(Login login) {
               return   JSONResult.success();
            }
        };
    }
}
